import request from '@/utils/request'

// 查询任务凭证列表
export function listVoucher(query) {
  return request({
    url: '/hospital/voucher/list',
    method: 'get',
    params: query
  })
}

// 查询任务凭证详细
export function getVoucher(voucherId) {
  return request({
    url: '/hospital/voucher/' + voucherId,
    method: 'get'
  })
}

// 新增任务凭证
export function addVoucher(data) {
  return request({
    url: '/hospital/voucher',
    method: 'post',
    data: data
  })
}

// 修改任务凭证
export function updateVoucher(data) {
  return request({
    url: '/hospital/voucher',
    method: 'put',
    data: data
  })
}

// 删除任务凭证
export function delVoucher(voucherId) {
  return request({
    url: '/hospital/voucher/' + voucherId,
    method: 'delete'
  })
}

// 导出任务凭证
export function exportVoucher(query) {
  return request({
    url: '/hospital/voucher/export',
    method: 'get',
    params: query
  })
}